# -*- coding: utf-8 -*-

import logging

from flask import Flask, request

import config
import util
import test
import rbsa
import file
import log

# 初始化日志
logger = logging.getLogger(config.flask_app_log)
log.init_logger(logger=logger)

app = Flask(__name__)

app.debug = True

# 注册蓝图
app.register_blueprint(test.bp)
app.register_blueprint(rbsa.bp)
app.register_blueprint(file.bp)
logger.info('register_blueprint')


@app.route('/home')
def index():
    resp = "main home"
    return resp


# 启动服务：进程阻塞，后面代码不会执行
app.run(host='0.0.0.0', port=8000)
